import request from '@/utils/request'
import { Api, DeleteRequest} from "@/interface/api";

//全部Api
export const ApisR = () => {
  return request({
    method: 'GET',
    url: '/api',
  })
}

//添加Api
export const ApiAddR = (req: Api) => {
  return request({
    method: 'POST',
    url: '/api',
    data: JSON.stringify(req),
  })
}

//修改Api
export const ApiUpdateR = (req: Api) => {
  return request({
    method: 'PUT',
    url: '/api',
    data: JSON.stringify(req),
  })
}


//删除Api
export const ApiRemoveR = (req:DeleteRequest) => {
  return request({
    method: 'DELETE',
    url: `/api`,
    params: req
  })
}

